﻿@model FeedGoogleShoppingModel
@using Grand.Plugin.Feed.GoogleShopping.Models;
@using Grand.Framework;

@{
    <div class="form-horizontal">
        <div class="form-body">
            <div class="form-group">
                <ul>
                    <li>
                        At least two unique product identifiers are required. So each of your product should
                        have manufacturer (brand) and MPN (manufacturer part number) specified
                    </li>
                    <li>Specify default tax values in your Google Merchant Center account settings</li>
                    <li>Specify default shipping values in your Google Merchant Center account settings</li>
                    <li>
                        In order to get more info about required fields look at the following article <a href="http://www.google.com/support/merchants/bin/answer.py?answer=188494" target="_blank">http://www.google.com/support/merchants/bin/answer.py?answer=188494</a>
                    </li>
                </ul>
            </div>
            <div class="form-group">
                <div class="col-md-3 text-right">
                    <admin-label asp-for="ProductPictureSize" class="control-label" />
                </div>
                <div class="col-md-9 col-sm-9">
                    <admin-input asp-for="ProductPictureSize" />
                    <span asp-validation-for="ProductPictureSize"></span>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-3 text-right">
                    <admin-label asp-for="PassShippingInfoWeight" class="control-label" />
                </div>
                <div class="col-md-9 col-sm-9">
                    <label class="mt-checkbox mt-checkbox-outline control control-checkbox">
                        <admin-input asp-for="PassShippingInfoWeight" />
                         <div class="control__indicator"></div>
                    </label>
                    <span asp-validation-for="PassShippingInfoWeight"></span>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-3 text-right">
                    <admin-label asp-for="PassShippingInfoDimensions" class="control-label" />
                </div>
                <div class="col-md-9 col-sm-9">
                    <label class="mt-checkbox mt-checkbox-outline control control-checkbox">
                        <admin-input asp-for="PassShippingInfoDimensions" />
                         <div class="control__indicator"></div>
                    </label>
                    <span asp-validation-for="PassShippingInfoDimensions"></span>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-3 text-right">
                    <admin-label asp-for="PricesConsiderPromotions" class="control-label" />
                </div>
                <div class="col-md-9 col-sm-9">
                    <label class="mt-checkbox mt-checkbox-outline control control-checkbox">
                        <admin-input asp-for="PricesConsiderPromotions" />
                         <div class="control__indicator"></div>
                    </label>
                    <span asp-validation-for="PricesConsiderPromotions"></span>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-3 text-right">
                    <admin-label asp-for="StoreId" class="control-label" />
                </div>
                <div class="col-md-9 col-sm-9">
                    <admin-select asp-for="StoreId" asp-items="Model.AvailableStores" />
                    <span asp-validation-for="StoreId"></span>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-3 text-right">
                    <admin-label asp-for="CurrencyId" class="control-label" />
                </div>
                <div class="col-md-9 col-sm-9">
                    <admin-select asp-for="CurrencyId" asp-items="Model.AvailableCurrencies" />
                    <span asp-validation-for="CurrencyId"></span>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-3 text-right">
                    <admin-label asp-for="DefaultGoogleCategory" class="control-label" />
                </div>
                <div class="col-md-9 col-sm-9">
                    <admin-select asp-for="DefaultGoogleCategory" asp-items="Model.AvailableGoogleCategories" />
                    <span asp-validation-for="DefaultGoogleCategory"></span>
                </div>
            </div>
            @if (Model.GeneratedFiles.Count > 0)
            {
                <div class="form-group">
                    <div class="col-md-3 text-right">
                        <admin-label asp-for="GeneratedFiles" class="control-label" />
                    </div>
                    <div class="col-md-9 col-sm-9">
                        <label class="control-label">
                            @for (int i = 0; i <= Model.GeneratedFiles.Count - 1; i++)
                            {
                                var generatedFile = Model.GeneratedFiles[i];
                                @generatedFile.StoreName <text>-</text> <a href="@generatedFile.FileUrl" target="_blank">@generatedFile.FileUrl</a>
                                if (i != Model.GeneratedFiles.Count - 1)
                                {
                                    <br />
                                }
                            }
                        </label>
                    </div>
                </div>
            }
        </div>
        <div class="form-actions">
            <div class="col-md-offset-3 col-sm-offset-3 col-md-9 col-sm-9">
                <input type="submit" name="save" class="btn green" value="@T("Admin.Common.Save")" />
                <input type="submit" name="generate" class="btn default" value="@T("Plugins.Feed.GoogleShopping.Generate")" />
            </div>
        </div>
    </div>
}
